from django.core.validators import MaxValueValidator, MinValueValidator
from rest_framework import serializers, fields

class PageScreenshotQpSerializer(serializers.Serializer):
  url = fields.CharField(required=True)
  width = fields.IntegerField(
    required=False,
    default=1280,
    validators=[MinValueValidator(50), MaxValueValidator(3840)]
  )
  height = fields.IntegerField(
    required=False,
    default=720,
    validators=[MinValueValidator(50), MaxValueValidator(2160)]
  )
